//
//  main.cpp
//  抽象基类
//
//  Created by huangj on 2018/5/1.
//  Copyright © 2018年 huangj. All rights reserved.
//

#include <iostream>

using namespace std;

class Fish {
    
public:
    virtual void Swim() = 0;
};

class Tuna:public Fish {
    
public:
    void Swim(){
        cout << "Tuna swims fast in the sea!" << endl;
    }
};

class Carp:public Fish {
    void Swim(){
        cout << "Carp swims slow in the lakes!" << endl;
    }
public:
    
};
void MakeFishSwim(Fish& inputFish){
    inputFish.Swim();
}
int main(int argc, const char * argv[]) {
    Carp myLunch;
    Tuna myDinner;
    MakeFishSwim(myLunch);
    MakeFishSwim(myDinner);
    return 0;
}
